<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        let result = true;
        if(result){
            //自动跳转到百度
            location.href = "https://www.baidu.com";
        }
    </script>
</head>
<body>

</body>
</html>